package com.vrv.vap.baseline.service.impl;

import com.vrv.vap.baseline.config.ExcelTemplateConfig;
import com.vrv.vap.baseline.entity.TbConf;
import com.vrv.vap.baseline.mapper.TbConfMapper;
import com.vrv.vap.baseline.service.AbstractExcelExportService;
import com.vrv.vap.baseline.util.FileOperationUtil;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

@Service
public class TbConfExportService extends AbstractExcelExportService<TbConf> {
    private static final String key = "tb_conf";
    private final TbConfMapper tbConfMapper;

    public TbConfExportService(FileOperationUtil fileOperationUtil, ExcelTemplateConfig excelTemplateConfig, TbConfMapper tbConfMapper) {
        super(fileOperationUtil, excelTemplateConfig, key);
        this.tbConfMapper = tbConfMapper;
    }

    @Override
    protected List<TbConf> getAllData() {
        return tbConfMapper.selectAll();
    }

    @Override
    protected void processData(List<TbConf> dataList, String format) throws IOException {
        // 如果需要对数据进行特殊处理，可以在这里实现
    }

    @Override
    protected Class<TbConf> getEntityClass() {
        return TbConf.class;
    }
}